<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>仓库管理系统</title>

    <link rel="stylesheet" href="./css/self.css">
    <style>
        .blue {
            color: blue;
        }
    </style>
</head>

<body>
    <div class="sidebar">
        <ol class="sidebar-box">
            <li>
                <h1 style="color: aqua;">test</h1>
            </li>
            <li class=""><img src="" alt="" class="siderbar-img"><a href="./index.html" class="sidebar-text">首页</a></li>
            <li class="sidebar-now"><img src="" alt="" class="siderbar-img"><a href="./warehouse-query.html" class="sidebar-text">物资查询</a></li>
            <li><img src="" alt="" class="siderbar-img"><a href="" class="sidebar-text">物资管理</a></li>
        </ol>
    </div>
    <div class="head-box">
        <h1>欢迎来到仓库管理系统</h1>
    </div>
    <div class="main-box">
        <h1 style="text-align: center;font-size: 50px;color: cornflowerblue;">你好，超级管理员</h1>
        <div style="height: auto;margin: 50px;border: 1px solid white;background-color: rgba(255, 255, 255, 0.493);">
            <h1>管理中心</h1>

            <iframe src="" frameborder="0" name="iframeName" style="display: none;"></iframe>
            <div class="message">
                <span>
                    <ol>
                    <li>
                    <label for="gid_input" class="name_input">商品id</label>
                    <input type="text" name="gid_input" id="gid_input">
                </li>
                <li>
                    <label for="gname_input" class="name_input">商品名称</label>
                    <input type="text" name="gname_input" id="gname_input">
                </li>
                </ol>
                </span>
                <span>
                    <label for="warehouse_id" class="name_input">仓库名称(warehouse1)</label>
                    <input type="text" name="warehouse_id" id="warehouse_id">
                </span>
                <span style="width: 100px;">
                    <button id="submit_button" onclick="submit_button_onclick()">查询</button>
                </span>
                <!-- <div class="col-1">
                    <input type="button" class="my-btn-blue" value="新建" ng-click="newFile()">
                </div> -->
            </div>

            <!-- <div id="my_dialog" title="新建公文" style="display: none">
                <form>
                    <p>文件名：<input type="text" id="create_name" /></p>
                    <p>作&nbsp;&nbsp;者&nbsp;&nbsp;：<input type="text" id="create_author" /></p>
                    <p>文&nbsp;&nbsp;种&nbsp;&nbsp;：<select id="create_type">
	                <option value ="总结报告">总结报告</option> 
	                <option value ="辅助授课">辅助授课</option> 
	                <option value ="其他">其他</option> 
	                </select>
                    </p>
                    <div style="float: right;">
                        <button class="my-btn-gray" ng-click="create_paper_cancel()">取消</button>
                        <button class="my-btn-blue" ng-click="create_paper_save()">保存</button>
                    </div>
                </form>
            </div>


            <div id="output_div">hello

            </div>
        </div> -->

        </div>

</body>
<!-- <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
    $scope.newFile = function() {
        $scope.showdiv();

    };
    $scope.showdiv = function() {
        $('#my_dialog').dialog({
            modal: true,
            width: "400",
            height: "223"
        });
        document.getElementById("my_dialog").style.display = "block";
    };
    $scope.create_paper_cancel = function() {
        console.info("取消");
        $("#create_name").val("");
        $("#create_author").val("");
        $("#create_type").empty();
        var ops = {
            "总结报告": "总结报告",
            "辅助授课": "辅助授课",
            "其他": "其他"
        };
        var parent = document.getElementById("create_type");
        for (var key in ops) {
            var o = new Option(ops[key], key);
            parent.appendChild(o);

        }
        $('#my_dialog').dialog("close");
    };
    $scope.create_paper_save = function() {
        $('#my_dialog').dialog("close");
        $scope.create_name = document.getElementById("create_name").value;
        var create_author = document.getElementById("create_author").value;
        var create_type = document.getElementById("create_type").value;
        var data = {
            filename: $scope.create_name,
            author: create_author,
            type: create_type
        };
        Document.create_paper_save(data, $http, function(response) {
            // 进一步的操作
            newFileextend();
        }, function() {
            alert("保存失败！");
        })
    };
</script> -->
<script>
    function pop_query_onclick() {
        alert('hello');

    }

    function pop_insert_onclick() {
        alert("");
    }
    /*新建文件*/
</script>


















<!-- <script type="text/javascript">
    // const mysql = require('mysql');
    var submit_btn = document.getElementById("submit_button");
    var gid_input = document.getElementById("gid_input");
    var gname_input = document.getElementById("gname_input");
    var output_div = document.getElementById("output_div");
    var warehouse_input = document.getElementById("warehouse_id");

    function submit_button_onclick() {

        var gid_input_text = document.getElementById("gid_input").value;
        var warehouse_input_text = document.getElementById("warehouse_id").value;
        var mysql = new mysql;

        var connection = mysql.createConnection({
            host: 'localhost',
            user: 'root',
            password: 'root',
            port: '3306',
            database: 'warehouse'
        });

        connection.connect();

        var sql = 'SELECT * FROM `' + warehouse_input_text + '` WHERE gid=' + gid_input;
        //查
        connection.query(sql, function(err, result) {
            if (err) {
                console.log('[SELECT ERROR] - ', err.message);
                return;
            }

            console.log('--------------------------SELECT----------------------------');
            console.log(result);
            console.log('------------------------------------------------------------\n\n');
        });

        connection.end();


    }
</script> -->

</html>